home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lantools / blueprnt / bpbioshd.mod < prev    next >
Text File  |  1990-01-27  |  4KB  |  119 lines

  1. ;*************************************************************
  2. ;* Blueprint LAN BIOS Header                  (BPBIOSHD.MOD) *
  3. ;* by Craig Chaiken                                          *
  4. ;* January 29, 1990                                          *
  5. ;*                                                           *
  6. ;* Defines all BP-LAN BIOS Constants.  Must be included in   *
  7. ;*   all BP-LAN system programs to maintain customizability. *
  8. ;*************************************************************
  9. ;
  10. ;*** Constants ***
  11. ;
  12. soh     =       01h     ;start of header byte
  13. ack     =       06h     ;acknowledge byte
  14. nak     =       15h     ;negative acknowledge byte
  15. can     =       18h     ;cancel byte
  16. ;
  17. maxsockets      equ     20h     ;allocate space for 32 network sockets
  18. ;
  19. ctrl_int        equ     80h     ;BIOS Control Interrupt
  20. phys_int        equ     81h     ;Physical I/O Interrupt
  21. link_int        equ     82h     ;Data Link Interrupt
  22. netw_int        equ     83h     ;Network Interrupt
  23. tran_int        equ     84h     ;Transport Data End to End Interrupt
  24. sess_int        equ     85h     ;Session Control Interrupt
  25. pres_int        equ     86h     ;Presentation Interrupt
  26. appl_int        equ     87h     ;Application Interrupt
  27.  
  28. ;*** BIOS Control Interrupt Subfunctions ***
  29. get_nodes       equ     0
  30. set_nodes       equ     1
  31. attach_printer  equ     2
  32. detach_printer  equ     3
  33. install_port    equ     4
  34. next_port       equ     5
  35. install_appl    equ     6
  36. get_info        equ     7
  37.  
  38. ;*** Physical Interrupt Subfunctions ***
  39. receive_status  equ     0
  40. receive_byte    equ     1
  41. transmit_status equ     2
  42. transmit_byte   equ     3
  43.  
  44. ;*** Data Link Layer Interrupt Subfunctions ***
  45. clear_checksum  equ     0
  46. calc_checksum   equ     1
  47. get_checksum    equ     2
  48. transmit_packet equ     3
  49. receive_packet  equ     4
  50. transmit_packet_status  equ     5
  51. receive_packet_status   equ     6
  52. get_retries     equ     7
  53.  
  54. ;*** Network Layer Interrupt Subfunctions ***
  55. ;    Reserved for Customization
  56.  
  57. ;*** Transport Layer Interrupt Subfunctions ***
  58. ;    Reserved for Customization
  59.  
  60. ;*** Session Layer Interrupt Subfunctions ***
  61. lock_printer    equ     0
  62. unlock_printer  equ     1
  63. set_semaphore   equ     2
  64. get_semaphore   equ     3
  65. clear_semaphore equ     4
  66.  
  67. ;*** Presentation Layer Interrupt Subfunctions ***
  68. ;    Reserved for Customization
  69.  
  70. ;*** Application Layer Interrupt Subfunctions ***
  71. ;    Reserved for Customization
  72.  
  73. ;*** Macros for Accessing BPBIOS Functions ***
  74. bpbios  macro   intnum,funcnum,socket_num,count,buffer_addr,overflow
  75.         mov     ah,funcnum
  76.         IFNB    <socket_num>
  77.         mov     bl,socket_num
  78.         ENDIF
  79.         IFNB    <count>
  80.         mov     cx,count
  81.         ENDIF
  82.         IFNB    <buffer_addr>
  83.         mov     dx,buffer_addr overflow
  84.         ENDIF
  85.         int     intnum
  86.         endm
  87.  
  88. get_packet      macro   socket_num,packet_length,packet_address,more
  89.         mov     ah,receive_packet
  90.         IFNB    <socket_num>
  91.         mov     bl,socket_num
  92.         ENDIF
  93.         IFNB    <packet_address>
  94.         mov     dx,packet_address more
  95.         ENDIF
  96.         int     link_int
  97.         IFNB    <packet_length>
  98.         mov     packet_length,cx
  99.         ENDIF
  100.         endm
  101.  
  102. put_packet      macro   socket_num,packet_length,packet_address,more
  103.         mov     ah,transmit_packet
  104.         IFNB    <socket_num>
  105.         mov     bl,socket_num
  106.         ENDIF
  107.         IFNB    <packet_length>
  108.         mov     cx,packet_length
  109.         ENDIF
  110.         IFNB    <packet_address>
  111.         mov     dx,packet_address more
  112.         ENDIF
  113.         int     link_int
  114.         endm
  115.  
  116. ;*************************************************************
  117. ;* End of BPBIOSHD.MOD                                       *
  118. ;*************************************************************
  119.